package com.songlanyun.modules.chain.model.dto;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 积分实时价格
 *
 * @author zhangqh
 */
@Data
public class Wrapper<T> implements Serializable {
    private static final long serialVersionUID = 6953811895994786613L;

    /**
     *  code = 0 业务成功
     *  code != 0 业务失败
     */
    private int code;

    private String message;

    private T data;

    public boolean success(){
        return this.code == 0;
    }

    @Data
    public static class ChainPointPriceDTO implements Serializable {

        private static final long serialVersionUID = -307193049285155125L;

        private String symbol;
        private Long time;
        private BigDecimal open;
        private BigDecimal high;
        private BigDecimal low;
        /**
         * 使用这个值
         */
        private BigDecimal close;
        private BigDecimal lastDayClose;
    }
}
